package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryDTO;
import com.sky.dto.CategoryPageQueryDTO;

import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    // 新增
    @AutoFill(OperationType.INSERT)
    void Addcategory(Category category);

    //分页查询
    List<Category> PagingQuery(CategoryPageQueryDTO categoryPageQueryDTO);

    //根据id修改分类
    @AutoFill(OperationType.UPDATE)
    void update(Category category);

    //启用，禁用
    void Enabledisable(Integer status, Integer id);

    //根据id删除
    void Delecategory(Long id);

   //根据类型查询分类
    List<Category> list(Integer type);
}
